<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="cache-control" content="no-cache">
<title>utf8.h File Reference</title>
<link href="doxygen_tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="doxygen_content.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="top">
 <div id="titlearea">
  <table height="72px" width="100%" cellspacing="0" cellpadding="0">
   <tbody>
    <tr>
     <td width="10%">&nbsp;</td>
     <td><a href="https://github.com/Genivia/RE-flex"><img src="reflex-logo.png"/></a></td>
     <td>
      <div style="float: right; font-size: 18px; font-weight: bold;">utf8.h File Reference</div>
      <br>
      <div style="float: right; font-size: 10px;">updated Fri Nov 22 2019 by Robert van Engelen</div>
     </td>
     <td width="10%">&nbsp;</td>
    </tr>
   </tbody>
  </table>
 </div>
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_bb8a7beb94a1b7afd52842cbf47ddd3e.html">reflex</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">utf8.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>RE/flex UCS to UTF-8 converters.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cstring&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for utf8.h:</div>
<div class="dyncontent">
<div class="center"><img src="utf8_8h__incl.png" border="0" usemap="#utf8_8h" alt=""/></div>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="utf8_8h__dep__incl.png" border="0" usemap="#utf8_8hdep" alt=""/></div>
<map name="utf8_8hdep" id="utf8_8hdep">
<area shape="rect" id="node2" href="input_8h.html" title="RE/flex input character sequence class. " alt="" coords="383,80,445,107"/>
<area shape="rect" id="node10" href="reflex_8h.html" title="RE/flex scanner generator replacement for Flex/Lex. " alt="" coords="480,229,545,256"/>
<area shape="rect" id="node3" href="abslexer_8h.html" title="RE/flex abstract lexer base class for reflex&#45;generated scanners. " alt="" coords="5,229,89,256"/>
<area shape="rect" id="node5" href="absmatcher_8h.html" title="RE/flex abstract matcher base class and pattern matcher class. " alt="" coords="249,155,352,181"/>
<area shape="rect" id="node9" href="pattern_8h.html" title="RE/flex regular expression pattern compiler. " alt="" coords="377,155,451,181"/>
<area shape="rect" id="node4" href="flexlexer_8h.html" title="RE/flex Flex&#45;compatible FlexLexer base class and Lex/Flex&#45;compatible macros. " alt="" coords="6,304,89,331"/>
<area shape="rect" id="node6" href="boostmatcher_8h.html" title="Boost::regex&#45;based matcher engines for pattern matching. " alt="" coords="113,229,227,256"/>
<area shape="rect" id="node7" href="matcher_8h.html" title="RE/flex matcher engine. " alt="" coords="375,229,456,256"/>
<area shape="rect" id="node8" href="stdmatcher_8h.html" title="C++11 std::regex&#45;based matcher engines for pattern matching. " alt="" coords="251,229,350,256"/>
<area shape="rect" id="node11" href="reflex_8cpp.html" title="RE/flex scanner generator replacement for Flex/Lex. " alt="" coords="473,304,553,331"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacereflex"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacereflex.html">reflex</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a75f9fce49b2f30fb97235c76cd70d32f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a75f9fce49b2f30fb97235c76cd70d32f">REFLEX_NONCHAR</a>&#160;&#160;&#160;(0x200000)</td></tr>
<tr class="memdesc:a75f9fce49b2f30fb97235c76cd70d32f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace invalid UTF-8 with the non-character U+200000 code point for guaranteed error detection (the U+FFFD code point makes error detection harder and possible to miss).  <a href="#a75f9fce49b2f30fb97235c76cd70d32f">More...</a><br /></td></tr>
<tr class="separator:a75f9fce49b2f30fb97235c76cd70d32f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac61199d73e7584c66092f847db38470a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#ac61199d73e7584c66092f847db38470a">REFLEX_NONCHAR_UTF8</a>&#160;&#160;&#160;&quot;\xf8\x88\x80\x80\x80&quot;</td></tr>
<tr class="separator:ac61199d73e7584c66092f847db38470a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a5cc2e91b0f3e1b8bb2611304c8c0e6ee"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacereflex.html#a5cc2e91b0f3e1b8bb2611304c8c0e6ee">reflex::latin1</a> (int a, int b, int esc= 'x', bool brackets=true)</td></tr>
<tr class="memdesc:a5cc2e91b0f3e1b8bb2611304c8c0e6ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an 8-bit ASCII + Latin-1 Supplement range [a,b] to a regex pattern.  <a href="namespacereflex.html#a5cc2e91b0f3e1b8bb2611304c8c0e6ee">More...</a><br /></td></tr>
<tr class="separator:a5cc2e91b0f3e1b8bb2611304c8c0e6ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bef462a65804089ae20c74dede75782"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacereflex.html#a7bef462a65804089ae20c74dede75782">reflex::utf8</a> (int a, int b, int esc= 'x', const char *par=&quot;(&quot;, bool strict=true)</td></tr>
<tr class="memdesc:a7bef462a65804089ae20c74dede75782"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a UCS-4 range [a,b] to a UTF-8 regex pattern.  <a href="namespacereflex.html#a7bef462a65804089ae20c74dede75782">More...</a><br /></td></tr>
<tr class="separator:a7bef462a65804089ae20c74dede75782"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a225d16c59f5f54f400412ed6cd4f340a"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacereflex.html#a225d16c59f5f54f400412ed6cd4f340a">reflex::utf8</a> (int c, char *s)</td></tr>
<tr class="memdesc:a225d16c59f5f54f400412ed6cd4f340a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert UCS-4 to UTF-8, fills with REFLEX_NONCHAR_UTF8 when out of range, or unrestricted UTF-8 with WITH_UTF8_UNRESTRICTED.  <a href="namespacereflex.html#a225d16c59f5f54f400412ed6cd4f340a">More...</a><br /></td></tr>
<tr class="separator:a225d16c59f5f54f400412ed6cd4f340a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fe93907a6b71a3e0b7688bec72638e4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacereflex.html#a2fe93907a6b71a3e0b7688bec72638e4">reflex::utf8</a> (const char *s, const char **r=NULL)</td></tr>
<tr class="memdesc:a2fe93907a6b71a3e0b7688bec72638e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert UTF-8 to UCS, returns REFLEX_NONCHAR for invalid UTF-8 except for MUTF-8 U+0000 and 0xD800-0xDFFF surrogate halves (use WITH_UTF8_UNRESTRICTED to remove any limits on UTF-8 encodings up to 6 bytes).  <a href="namespacereflex.html#a2fe93907a6b71a3e0b7688bec72638e4">More...</a><br /></td></tr>
<tr class="separator:a2fe93907a6b71a3e0b7688bec72638e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b96269b32fa93759f21bf76427aa3fd"><td class="memItemLeft" align="right" valign="top">std::wstring&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacereflex.html#a0b96269b32fa93759f21bf76427aa3fd">reflex::wcs</a> (const char *s, size_t n)</td></tr>
<tr class="memdesc:a0b96269b32fa93759f21bf76427aa3fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert UTF-8 string to wide string.  <a href="namespacereflex.html#a0b96269b32fa93759f21bf76427aa3fd">More...</a><br /></td></tr>
<tr class="separator:a0b96269b32fa93759f21bf76427aa3fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a713b79db623aa036afa3aa7f4fda8d5b"><td class="memItemLeft" align="right" valign="top">std::wstring&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacereflex.html#a713b79db623aa036afa3aa7f4fda8d5b">reflex::wcs</a> (const std::string &amp;s)</td></tr>
<tr class="memdesc:a713b79db623aa036afa3aa7f4fda8d5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert UTF-8 string to wide string.  <a href="namespacereflex.html#a713b79db623aa036afa3aa7f4fda8d5b">More...</a><br /></td></tr>
<tr class="separator:a713b79db623aa036afa3aa7f4fda8d5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>RE/flex UCS to UTF-8 converters. </p>
<dl class="section author"><dt>Author</dt><dd>Robert van Engelen - <a href="#" onclick="location.href='mai'+'lto:'+'eng'+'el'+'en@'+'ge'+'niv'+'ia'+'.co'+'m'; return false;">engel<span style="display: none;">.nosp@m.</span>en@g<span style="display: none;">.nosp@m.</span>enivi<span style="display: none;">.nosp@m.</span>a.co<span style="display: none;">.nosp@m.</span>m</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c) 2015-2017, Robert van Engelen, Genivia Inc. All rights reserved. </dd>
<dd>
(c) BSD-3 License - see LICENSE.txt </dd></dl>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a75f9fce49b2f30fb97235c76cd70d32f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define REFLEX_NONCHAR&#160;&#160;&#160;(0x200000)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Replace invalid UTF-8 with the non-character U+200000 code point for guaranteed error detection (the U+FFFD code point makes error detection harder and possible to miss). </p>

</div>
</div>
<a class="anchor" id="ac61199d73e7584c66092f847db38470a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define REFLEX_NONCHAR_UTF8&#160;&#160;&#160;&quot;\xf8\x88\x80\x80\x80&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
<hr class="footer">
<address class="footer"><small>
Converted on Fri Nov 22 2019 14:30:50 by <a target="_blank" href="http://www.doxygen.org/index.html">Doxygen</a> 1.8.11</small></address>
<br>
<div style="height: 246px; background: #DBDBDB;">
</body>
</html>
